/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.edu.pucp.Reportes.Vista;

import java.awt.event.ActionListener;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.Date;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import pe.edu.pucp.Maestros.Controlador.AeropuertoControlador;
import pe.edu.pucp.Modelo.Ciudad;
import pe.edu.pucp.Modelo.Continente;
import pe.edu.pucp.Modelo.Pais;
import pe.edu.pucp.Modelo.Permiso;
import pe.edu.pucp.Util.Constante;
import pe.edu.pucp.Util.Reportclass.RepCancelaciones;
/**
 *
 * @author katy
 */
public class ReporteCancelacionGUI extends javax.swing.JPanel {

    private JFrame padre;
    private AeropuertoControlador c;
    /**
     * Creates new form ReportePedidosGUI
     */
    public ReporteCancelacionGUI() {
        initComponents();        
        ((JTextField)dtcFechaInicio.getDateEditor()).setEditable(false);
        ((JTextField)dtcFechaFin.getDateEditor()).setEditable(false);
        dtcFechaInicio.setMaxSelectableDate(new Date());
        dtcFechaFin.setMaxSelectableDate(new Date());        
    }
   
    public JFrame getPadre(){ return padre; }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        cmbContinenteOrigen = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        cmbPaisOrigen = new javax.swing.JComboBox();
        dtcFechaFin = new com.toedter.calendar.JDateChooser();
        jLabel4 = new javax.swing.JLabel();
        dtcFechaInicio = new com.toedter.calendar.JDateChooser();
        btnBuscar = new javax.swing.JButton();
        btnLimpiar = new javax.swing.JButton();
        btnGenerarPDF = new javax.swing.JButton();
        cmbPaisDestino = new javax.swing.JComboBox();
        cmbContinenteDestino = new javax.swing.JComboBox();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        cmbCiudadOrigen = new javax.swing.JComboBox();
        cmbCiudadDestino = new javax.swing.JComboBox();
        pnCancelacion = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblResultados = new javax.swing.JTable();

        setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        setMaximumSize(new java.awt.Dimension(764, 700));
        setMinimumSize(new java.awt.Dimension(764, 700));
        setName(""); // NOI18N
        setPreferredSize(new java.awt.Dimension(764, 700));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Reporte de Cancelacion de paquetes"));
        jPanel1.setPreferredSize(new java.awt.Dimension(634, 240));

        jLabel1.setText("Continente:");

        jLabel2.setText("Fecha fin: ");

        jLabel3.setText("Pais:");

        dtcFechaFin.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                dtcFechaFinPropertyChange(evt);
            }
        });

        jLabel4.setText("Fecha inicio: ");

        dtcFechaInicio.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                dtcFechaInicioPropertyChange(evt);
            }
        });

        btnBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/search.png"))); // NOI18N

        btnLimpiar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/refresh.png"))); // NOI18N

        btnGenerarPDF.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Recurso/address_book.png"))); // NOI18N

        jLabel6.setText("Aeropuerto origen");

        jLabel7.setText("Aeropuerto destino");

        jLabel8.setText("Ciudad:");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(213, 213, 213)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel7)
                .addGap(90, 90, 90))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnLimpiar, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnGenerarPDF, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel3)
                    .addComponent(jLabel8)
                    .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(42, 42, 42)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cmbPaisOrigen, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbCiudadOrigen, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dtcFechaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dtcFechaFin, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbContinenteOrigen, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cmbPaisDestino, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbCiudadDestino, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbContinenteDestino, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(27, 27, 27))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel1)
                    .addComponent(cmbContinenteOrigen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbContinenteDestino, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel3)
                    .addComponent(cmbPaisOrigen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbPaisDestino, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jLabel8)
                    .addComponent(cmbCiudadOrigen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(cmbCiudadDestino, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(dtcFechaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(dtcFechaFin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addGap(5, 5, 5)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnGenerarPDF, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnBuscar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnLimpiar, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(5, 5, 5))
        );

        pnCancelacion.setBorder(javax.swing.BorderFactory.createTitledBorder("Cancelaciones"));

        jScrollPane1.setToolTipText("");

        tblResultados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "ORIGEN", "DESTINO", "SISTEMA", "CLIENTE", "REALIZADOS"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblResultados.setColumnSelectionAllowed(true);
        tblResultados.getTableHeader().setReorderingAllowed(false);
        jScrollPane1.setViewportView(tblResultados);
        tblResultados.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tblResultados.getColumnModel().getColumn(0).setResizable(false);
        tblResultados.getColumnModel().getColumn(0).setPreferredWidth(200);
        tblResultados.getColumnModel().getColumn(1).setResizable(false);
        tblResultados.getColumnModel().getColumn(1).setPreferredWidth(200);
        tblResultados.getColumnModel().getColumn(2).setResizable(false);
        tblResultados.getColumnModel().getColumn(2).setPreferredWidth(100);
        tblResultados.getColumnModel().getColumn(3).setResizable(false);
        tblResultados.getColumnModel().getColumn(3).setPreferredWidth(100);
        tblResultados.getColumnModel().getColumn(4).setResizable(false);
        tblResultados.getColumnModel().getColumn(4).setPreferredWidth(102);

        javax.swing.GroupLayout pnCancelacionLayout = new javax.swing.GroupLayout(pnCancelacion);
        pnCancelacion.setLayout(pnCancelacionLayout);
        pnCancelacionLayout.setHorizontalGroup(
            pnCancelacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnCancelacionLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1)
                .addContainerGap())
        );
        pnCancelacionLayout.setVerticalGroup(
            pnCancelacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnCancelacionLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 358, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 738, Short.MAX_VALUE)
                    .addComponent(pnCancelacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnCancelacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void dtcFechaInicioPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_dtcFechaInicioPropertyChange
        if ("date".equals(evt.getPropertyName())) {
            dtcFechaFin.setMinSelectableDate((Date) evt.getNewValue());
        }    
    }//GEN-LAST:event_dtcFechaInicioPropertyChange

    private void dtcFechaFinPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_dtcFechaFinPropertyChange
        if ("date".equals(evt.getPropertyName())) {
            dtcFechaInicio.setMaxSelectableDate((Date) evt.getNewValue());                              
        }  
    }//GEN-LAST:event_dtcFechaFinPropertyChange

    public void addCambiarContinente(ItemListener ml){ cmbContinenteOrigen.addItemListener(ml); }     
    
    public void addCambiarPais(ItemListener ml){ cmbPaisOrigen.addItemListener(ml); }      
           
    public Date getFechaInicio() { 
        return dtcFechaInicio.getDate();     
    }
    
    public Date getFechaFin() { 
        return dtcFechaFin.getDate(); 
    }

    public int getContinenteOrigen(){ 
        if (cmbContinenteOrigen.getSelectedIndex() > 0) {
            return cmbContinenteOrigen.getSelectedIndex() - 1;
        }
        else {
            return -1;
        }                
    }
    
    public int getContinenteDestino(){ 
        if (cmbContinenteDestino.getSelectedIndex() > 0) {
            return cmbContinenteDestino.getSelectedIndex() - 1;
        }
        else {
            return -1;
        }                                
    }  
     
    public int getPaisOrigen(){ 
        if (cmbPaisOrigen.getSelectedIndex() > 0) {
            return cmbPaisOrigen.getSelectedIndex() - 1;
        }
        else {
            return -1;
        }                                                
    }  
    
    public int getPaisDestino(){ 
        if (cmbPaisDestino.getSelectedIndex() > 0) {
            return cmbPaisDestino.getSelectedIndex() - 1;
        }
        else {
            return -1;
        }                 
    }     
    
    public int getCiudadOrigen(){ 
        if (cmbCiudadOrigen.getSelectedIndex() > 0) {
            return cmbCiudadOrigen.getSelectedIndex() - 1;
        }
        else {
            return -1;
        }                         
    }  
    
    public int getCiudadDestino(){ 
        if (cmbCiudadDestino.getSelectedIndex() > 0) {
            return cmbCiudadDestino.getSelectedIndex() - 1;
        }
        else {
            return -1;
        }                     
    }        
    
    public void mostrarPermisos(ArrayList<Permiso> list){            
        if (!list.isEmpty()){                                
//            btnBuscar.setEnabled(buscarPermiso(list,Constante.P_REP_CAN_BUSCAR)==1);
//            btnGenerarPDF.setEnabled(buscarPermiso(list,Constante.P_REP_CAN_GENERAR)==1);
        }
    }       
    
    public int buscarPermiso(ArrayList<Permiso> list, int idel){
        int per=-1;
        for (Permiso opc : list){
            if (opc.getElemento().getIdelemento()==idel){ per =opc.getPermiso(); }
        }
        return per;
    }     
    
    
    public void addBuscarListener(ActionListener ml){ this.btnBuscar.addActionListener(ml); }    

    public void addLimpiarListener(ActionListener ml){ this.btnLimpiar.addActionListener(ml); }  

    public void addGenerarListener(ActionListener ml){ this.btnGenerarPDF.addActionListener(ml); }     
    
    public void addCambiarContinenteOrigen(ItemListener ml){ this.cmbContinenteOrigen.addItemListener(ml); }     
    
    public void addCambiarPaisOrigen(ItemListener ml){ this.cmbPaisOrigen.addItemListener(ml); }         
    
    public void addCambiarCiudadOrigen(ItemListener ml){ this.cmbCiudadOrigen.addItemListener(ml); }    

    public void addCambiarContinenteDestino(ItemListener ml){ this.cmbContinenteDestino.addItemListener(ml); }     
    
    public void addCambiarPaisDestino(ItemListener ml){ this.cmbPaisDestino.addItemListener(ml); }         
    
    public void addCambiarCiudadDestino(ItemListener ml){ this.cmbCiudadDestino.addItemListener(ml); }        
        
    public void llenarComboContinenteOrigen(ArrayList<Continente> lista){
        cmbContinenteOrigen.removeAllItems();
        cmbContinenteOrigen.addItem(Constante.DEFAULT_OPCION);     
        if(lista!=null){
            for (Continente opc : lista){
                cmbContinenteOrigen.addItem(opc.getDescripcion());
            }
        }
    }
    
    public void llenarComboContinenteDestino(ArrayList<Continente> lista){
        cmbContinenteDestino.removeAllItems();
        cmbContinenteDestino.addItem(Constante.DEFAULT_OPCION);     
        if(lista!=null){
            for (Continente opc : lista){
                cmbContinenteDestino.addItem(opc.getDescripcion());
            }
        }
    }    
    
    public void llenarComboPaisOrigen(ArrayList<Pais> lista){
        cmbPaisOrigen.removeAllItems();
        cmbPaisOrigen.addItem(Constante.DEFAULT_OPCION);     
        if(lista!=null){           
            for (Pais opc : lista){
                cmbPaisOrigen.addItem(opc.getDescripcion());
            }
        }
    }
    
    public void llenarComboPaisDestino(ArrayList<Pais> lista){
        cmbPaisDestino.removeAllItems();
        cmbPaisDestino.addItem(Constante.DEFAULT_OPCION);     
        if(lista!=null){           
            for (Pais opc : lista){
                cmbPaisDestino.addItem(opc.getDescripcion());
            }
        }
    }

    public void llenarComboCiudadOrigen(ArrayList<Ciudad> lista){
        cmbCiudadOrigen.removeAllItems();
        cmbCiudadOrigen.addItem(Constante.DEFAULT_OPCION);     
        if(lista!=null){
            for (Ciudad opc : lista){
                cmbCiudadOrigen.addItem(opc.getDescripcion());
            }
        }
    }    
    
    public void llenarComboCiudadDestino(ArrayList<Ciudad> lista){
        cmbCiudadDestino.removeAllItems();
        cmbCiudadDestino.addItem(Constante.DEFAULT_OPCION);     
        if(lista!=null){
            for (Ciudad opc : lista){
                cmbCiudadDestino.addItem(opc.getDescripcion());
            }
        }
    }     
    
    public void llenaGrilla(ArrayList<RepCancelaciones> lista){
        if(lista!=null){ 
            ((DefaultTableModel) this.tblResultados.getModel()).setRowCount(0);
            for (int f = 0; f<lista.size();f++){
                ((DefaultTableModel) tblResultados.getModel()).setRowCount(tblResultados.getRowCount()+1);                                          
                tblResultados.setValueAt(lista.get(f).getOrigen(),f,0);
                tblResultados.setValueAt(lista.get(f).getDestino(),f,1);                
                tblResultados.setValueAt(lista.get(f).getCancelAlg(),f,2);
                tblResultados.setValueAt(lista.get(f).getCancelCli(),f,3);                               
                tblResultados.setValueAt(lista.get(f).getRealizados(),f,4);    
            }
            pnCancelacion.setBorder(javax.swing.BorderFactory.createTitledBorder("Cancelaciones ("+lista.size() + ")"));            
        } 
        else {
            pnCancelacion.setBorder(javax.swing.BorderFactory.createTitledBorder("Cancelaciones"));            
        }
    }
    
    public void LimpiarDatos(){        
        cmbContinenteOrigen.setSelectedIndex(0);
        cmbContinenteDestino.setSelectedIndex(0);
        cmbPaisOrigen.setSelectedIndex(0);
        cmbPaisDestino.setSelectedIndex(0);
        cmbCiudadOrigen.setSelectedIndex(0);
        cmbCiudadDestino.setSelectedIndex(0);
        dtcFechaInicio.setDate(null);
        dtcFechaFin.setDate(null);
    }       
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscar;
    private javax.swing.JButton btnGenerarPDF;
    private javax.swing.JButton btnLimpiar;
    private javax.swing.JComboBox cmbCiudadDestino;
    private javax.swing.JComboBox cmbCiudadOrigen;
    private javax.swing.JComboBox cmbContinenteDestino;
    private javax.swing.JComboBox cmbContinenteOrigen;
    private javax.swing.JComboBox cmbPaisDestino;
    private javax.swing.JComboBox cmbPaisOrigen;
    private com.toedter.calendar.JDateChooser dtcFechaFin;
    private com.toedter.calendar.JDateChooser dtcFechaInicio;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JPanel pnCancelacion;
    private javax.swing.JTable tblResultados;
    // End of variables declaration//GEN-END:variables
}
